import axios from 'axios'
import qs from 'qs'
export function getQuestionsData(params) {
    return axios({
        url: "/questions/examList",
        method: 'get',
        params
    })
}
export function addQuestionData(data) {
    data.options = JSON.stringify(data.options);
    return axios({
        method: "post",
        url: "/questions/saveExam",
        data
    })
}

export function updateQuestionData(data) {
    data.options = JSON.stringify(data.options);
    console.log(data);
    return axios({
        method: "post",
        url: "/questions/updateExam",
        data
    })
}

export function delQuestionData(params) {
    return axios({
        method: "get",
        url: "/questions/deleteExam",
        params
    })
}